<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>京东顶部导航条</title>
    <link rel="stylesheet" href="./css/reset.css">
    <!-- <link rel="stylesheet" href="./fa/css/all.css"> -->
    <style>
        body{
            font-size: 14px;
           
        }
        .box-inner a,
        .box-inner span
        .box-inner i{
          color: #999;
          text-decoration: none;

        }
        /* 解决高度塌陷问题 */
        .clearfix::before,
        .clearfix::after{
            content: "";
            display: table;
            clear: both;
        }
        /* 设置外部容器的样式 */
        .box-outer{
            /* 设置宽度 */
            width: 100%;
            /* 设置行高,使文字垂直居中 */
            line-height: 30px;
            /* 设置背景颜色 */
            background-color: #E3E4E5;
            /* 设置下边框 */
            border-bottom: 1px #ddd solid;
        }
        /* 设置内部容器的样式 */
        .box-inner{
            width: 1190px;
            margin: 0 auto;
            position: relative;
        }
        .box-inner a:hover,
        .box-inner a.highlight{
            color: red;
        }
        
        /* 设置左边的菜单 */
        .box-inner-left{
            float: left;
        }
        /* 设置左边菜单栏的小图标 */
        .box-inner-left .fas{
            font-size: 14px;
            color: red;
        }
        /* 设置城市列表的效果 */
        .box-inner-left .city-list{
            width: 320px;
            height: 436px;
            background-color: white;
            border: 1px solid rgb(204,204,204);
            display: none;
            /* 设置绝对定位,使其不占据页面的位置 */
            position: absolute;
            box-shadow: 0 2px 2px rgba(0,0,0,.2);
            z-index: 999;
        }
        /* 当鼠标移入到location时,rang city-list显示
           hover给父元素 */
        .box-inner-left:hover .city-list{
            display: block;
        }
        .current-city{
            padding: 0 10PX;
            position: relative;
            z-index: 9999;

        }
        /*设置current-city的移入效果 */
        .current-city:hover{
            background-color: white;
            border: 1px solid rgb(204,204,204);
            border-bottom: none;
        }
        /* 设置右边的菜单 */
        .box-inner-right{
            float: right;
        }
        /* 设置分割线 */
        .box-inner-right .line{
            width: 1px;
            height: 10px;
            background-attachment: #999;
            margin: 10px 12px;
        }
        /* 设置右侧导航栏的li */
        .box-inner-right li{
            float: left;
        }
    </style>

<body>
    <!-- 创建外围的容器 -->
    <div class="box-outer">
        <!-- 创建内部的容器 -->
        <div class="box-inner clearfix">
            <!-- 左侧的菜单 -->
            <div class="box-inner-left">
                <div class="current-city">
                    <i class="fas fa-map-marker-alt"></i>
                    <a href="javascript:;">北京</a>
                </div>
                <!-- 城市列表 -->
                <div class="city-list">

                </div>
            </div>
            <!-- 右侧的菜单 -->
            <ul class="box-inner-right clearfix">
                <li>
                    <a href="javascript:;">你好,请登录</a>
                    <a class="highlight" href="javascript:;">免费注册</a>
                </li>
                <!-- 分隔线 -->
                <li class="line"></li>
                <li>
                    <a href="javascript:;">我的订单</a>
                </li>
                <li class="line"></li>
                <li>
                    <a href="javascript:;">我的京东</a>
                    <!-- <li class="fas fa-angle-down"></li> -->
                </li>
                <li class="line"></li>
                <li>
                    <a href="javascript:;">京东会员</a>
                </li>
                <li class="line"></li>
                <li>
                    <a class="highlight" href="javascript:;">企业采购</a>
                    <!-- <li class="fas fa-angle-down"></li> -->
                </li>
                <li class="line"></li>
                <li>
                    <span>客户服务</span>
                    <!-- <li class="fas fa-angle-down"></li> -->
                </li>
                <li class="line"></li>
                <li>
                    <span>网站导航</span>
                    <!-- <li class="fas fa-angle-down"></li> -->
                </li>
                <li class="line"></li>
                <li>
                   <span>手机京东</span>
                </li>
            </ul>
        </div>
    </div>
</body>

</html>